3.6 \(\int \frac{\csc ^2(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=9 \[ \log (\sin (x))-i x \]

[Out]

(-I)*x + Log[Sin[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.032013, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3487, 31} \[ \log (\sin (x))-i x \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2/(I + Cot[x]),x]

[Out]

(-I)*x + Log[Sin[x]]

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{\csc ^2(x)}{i+\cot (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{i+x} \, dx,x,\cot (x)\right )\\ &=-i x+\log (\sin (x))\\ \end{align*}

Mathematica [A]  time = 0.0032833, size = 9, normalized size = 1. \[ \log (\sin (x))-i x \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2/(I + Cot[x]),x]

[Out]

(-I)*x + Log[Sin[x]]

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 9, normalized size = 1. \begin{align*} -\ln \left ( i+\cot \left ( x \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^2/(I+cot(x)),x)

[Out]

-ln(I+cot(x))

________________________________________________________________________________________

Maxima [A]  time = 1.21216, size = 9, normalized size = 1. \begin{align*} -\log \left (\cot \left (x\right ) + i\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(I+cot(x)),x, algorithm="maxima")

[Out]

-log(cot(x) + I)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left ({\left (e^{\left (2 i \, x\right )} - 1\right )} e^{\left (2 i \, x\right )}{\rm integral}\left (\frac{2 i \, e^{\left (-2 i \, x\right )}}{e^{\left (2 i \, x\right )} - 1}, x\right ) - e^{\left (2 i \, x\right )} + 1\right )} e^{\left (-2 i \, x\right )}}{e^{\left (2 i \, x\right )} - 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(I+cot(x)),x, algorithm="fricas")

[Out]

((e^(2*I*x) - 1)*e^(2*I*x)*integral(2*I*e^(-2*I*x)/(e^(2*I*x) - 1), x) - e^(2*I*x) + 1)*e^(-2*I*x)/(e^(2*I*x)
- 1)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**2/(I+cot(x)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [B]  time = 1.25351, size = 22, normalized size = 2.44 \begin{align*} -2 \, \log \left (\tan \left (\frac{1}{2} \, x\right ) - i\right ) + \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(I+cot(x)),x, algorithm="giac")

[Out]

-2*log(tan(1/2*x) - I) + log(abs(tan(1/2*x)))